#ifndef STORAGE_TUPLE_PAGE_TUPLE_H
#define STORAGE_TUPLE_PAGE_TUPLE_H 1

#include <common/macro/build.h>
#include <storage/page.h>
#include <storage/tuple/tuple.h>

struct page_tuple_t {
	page_t *common;

	tuple_t *tuples;
	page_item_t tuples_c;
};

API_LIBLOCAL page_tuple_t *page_tuple_new(page_t *);
API_LIBLOCAL int page_tuple_insert(page_tuple_t *, tuple_t *);
API_LIBLOCAL int page_tuple_delete(page_tuple_t *, page_item_t);
API_LIBLOCAL int page_tuple_serialize(page_tuple_t *, char *, ssize_t);
API_LIBLOCAL int page_tuple_deserialize(page_tuple_t **, char *, ssize_t, page_t *);
API_LIBLOCAL void page_tuple_destroy(page_tuple_t *);

#endif
